package com.bootdo.lvyou.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

import com.bootdo.lvyou.dao.LvyouScenicRouteDao;
import com.bootdo.lvyou.domain.LvyouScenicRoute;
import com.bootdo.lvyou.service.LvyouScenicRouteService;



@Service
public class LvyouScenicRouteServiceImpl implements LvyouScenicRouteService {
	@Autowired
	private LvyouScenicRouteDao lvyouScenicRouteDao;
	
	@Override
	public LvyouScenicRoute get(Long id){
		return lvyouScenicRouteDao.get(id);
	}
	
	@Override
	public List<LvyouScenicRoute> list(Map<String, Object> map){
		return lvyouScenicRouteDao.list(map);
	}
	
	@Override
	public int count(Map<String, Object> map){
		return lvyouScenicRouteDao.count(map);
	}
	
	@Override
	public int save(LvyouScenicRoute lvyouScenicRoute){
	
		if(lvyouScenicRoute.getId() != null) {
			return lvyouScenicRouteDao.update(lvyouScenicRoute);
		}else {
			return lvyouScenicRouteDao.save(lvyouScenicRoute);
		}		
	
		
	}
	
	@Override
	public int update(LvyouScenicRoute lvyouScenicRoute){
		return lvyouScenicRouteDao.update(lvyouScenicRoute);
	}
	
	@Override
	public int remove(Long id){
		return lvyouScenicRouteDao.remove(id);
	}
	
	@Override
	public int batchRemove(Long[] ids){
		return lvyouScenicRouteDao.batchRemove(ids);
	}
	
}
